import {PropUiState} from "db://assets/Scripts/MVC/Prop/PropUiState";
import {BulletType} from "db://assets/Scripts/MVC/Bullet/BulletType";

/**
 * 道具ViewModel
 */
export class PropViewModel {
    /**
     * 道具UiState
     */
    public uiState: PropUiState = new PropUiState();

    /**
     * 根据道具节点名称获取子弹类型
     *
     * @param name 道具节点名称
     */
    public getBulletType(name: string): BulletType {
        switch (name) {
            case "PropBulletS":
                return BulletType.S;
            case "PropBulletH":
                return BulletType.H;
            default:
                return BulletType.M;
        }
    }
}